<?php
/*
 * Copyright (c) 2017-2025 Tencent. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
namespace TencentCloud\Trocket\V20230308\Models;
use TencentCloud\Common\AbstractModel;

/**
 * DescribeMigratingGroupStats response structure.
 *
 * @method integer getSourceConsumeLag() Obtain Source cluster consumer group accumulation.
 * @method void setSourceConsumeLag(integer $SourceConsumeLag) Set Source cluster consumer group accumulation.
 * @method integer getTargetConsumeLag() Obtain Target cluster consumer group accumulation.
 * @method void setTargetConsumeLag(integer $TargetConsumeLag) Set Target cluster consumer group accumulation.
 * @method array getSourceConsumerClients() Obtain Source cluster connection client list.
 * @method void setSourceConsumerClients(array $SourceConsumerClients) Set Source cluster connection client list.
 * @method array getTargetConsumerClients() Obtain Target cluster connection client list.
 * @method void setTargetConsumerClients(array $TargetConsumerClients) Set Target cluster connection client list.
 * @method string getRequestId() Obtain The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
 * @method void setRequestId(string $RequestId) Set The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
 */
class DescribeMigratingGroupStatsResponse extends AbstractModel
{
    /**
     * @var integer Source cluster consumer group accumulation.
     */
    public $SourceConsumeLag;

    /**
     * @var integer Target cluster consumer group accumulation.
     */
    public $TargetConsumeLag;

    /**
     * @var array Source cluster connection client list.
     */
    public $SourceConsumerClients;

    /**
     * @var array Target cluster connection client list.
     */
    public $TargetConsumerClients;

    /**
     * @var string The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
     */
    public $RequestId;

    /**
     * @param integer $SourceConsumeLag Source cluster consumer group accumulation.
     * @param integer $TargetConsumeLag Target cluster consumer group accumulation.
     * @param array $SourceConsumerClients Source cluster connection client list.
     * @param array $TargetConsumerClients Target cluster connection client list.
     * @param string $RequestId The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
     */
    function __construct()
    {

    }

    /**
     * For internal only. DO NOT USE IT.
     */
    public function deserialize($param)
    {
        if ($param === null) {
            return;
        }
        if (array_key_exists("SourceConsumeLag",$param) and $param["SourceConsumeLag"] !== null) {
            $this->SourceConsumeLag = $param["SourceConsumeLag"];
        }

        if (array_key_exists("TargetConsumeLag",$param) and $param["TargetConsumeLag"] !== null) {
            $this->TargetConsumeLag = $param["TargetConsumeLag"];
        }

        if (array_key_exists("SourceConsumerClients",$param) and $param["SourceConsumerClients"] !== null) {
            $this->SourceConsumerClients = [];
            foreach ($param["SourceConsumerClients"] as $key => $value){
                $obj = new ConsumerClient();
                $obj->deserialize($value);
                array_push($this->SourceConsumerClients, $obj);
            }
        }

        if (array_key_exists("TargetConsumerClients",$param) and $param["TargetConsumerClients"] !== null) {
            $this->TargetConsumerClients = [];
            foreach ($param["TargetConsumerClients"] as $key => $value){
                $obj = new ConsumerClient();
                $obj->deserialize($value);
                array_push($this->TargetConsumerClients, $obj);
            }
        }

        if (array_key_exists("RequestId",$param) and $param["RequestId"] !== null) {
            $this->RequestId = $param["RequestId"];
        }
    }
}
